package put.io.lists;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class SortedListsOperationsTest {
	
	SortedListsOperations subject;

	@Before
	public void setUp() throws Exception {
		subject = new SortedListsOperations();
	}

	@After
	public void tearDown() throws Exception {
		subject = null;
	}

	@Test
	public void addListsOfNumbersTest() {
		int[] 	a = new int[]{1, 2, 3, 5, 10}, 
				b = new int[]{4, 6, 7, 8, 9}, 
				sum = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
				result;
		result = subject.addListsOfNumbers(a, b);
		assertArrayEquals(sum, result);
	}
	
	@Test
	public void subtractListsOfNumbersTest() {
		int[] 	a = new int[]{1, 2, 5}, 
				b = new int[]{2, 3, 4}, 
				sum = new int[]{1, 5},
				result;
		result = subject.subtractListsOfNumbers(a, b);
		assertArrayEquals(sum, result);
	}

}
